package chp12.home;

import java.util.Arrays;

public class Home2 {

    public static void main(String[] args) {
        int count = 10;
        int num = 3;
        int[] nums = initNums(num,count);
        System.out.println(Arrays.toString(nums));
    }

    //返回一个长度为count，内容都由num填充的数组
    public static int[] initNums(int num,int count){
        int[] nums = new int[count];
        for (int i = 0; i < nums.length; i++) {
            nums[i] = num;
        }
        return nums;
    }
}
